Bentley Map V8i (SELECTseries 10) Help

Assign Foreign Key with an Annotation

In addition to the primary key, a foreign key constraint needs to be created to express the relationship between the data in the parent table and the table used to store annotations.

Adding a foreign key to link the customers_text table to the customers table requires the following ALTER TABLE statement:

ALTER TABLE customers_text
  ADD CONSTRAINT customers_text_fk
   FOREIGN KEY (customers_ref) REFERENCES customers(customer_id)
    ON DELETE CASCADE;

This will ensure that the two tables are tied together and that a delete of a row in the root table will trigger a delete of all the rows that in the annotation table that have a reference to the deleted root table row.

The combination of the root and annotation tables, connected through the foreign key should be sufficient for Bentley Map to extract/modify/post features with annotations.